﻿using Microsoft.EntityFrameworkCore;
using RH.Template;
using RH.Template.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace RH.Template.EntityFrameworkCore
{
    [ConnectionStringName(TemplateDbProperties.ConnectionStringName)]
    public class RHTemplateDbContext : AbpDbContext<RHTemplateDbContext>, IRHTemplateDbContext
    {
        /* Add DbSet for each Aggregate Root here. Example:
         * public DbSet<Question> Questions { get; set; }
         */

        public RHTemplateDbContext(DbContextOptions<RHTemplateDbContext> options) 
            : base(options)
        {

        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);

            builder.ConfigureRHTemplate();
        }
    }
}